//
//  GQProfileTool.m
//  GuQu
//
//  Created by HELIUM STAR on 15/6/19.
//  Copyright (c) 2015年 HELIUM STAR. All rights reserved.
//

#import "GQProfileTool.h"
#import "GQHttpTool.h"

@implementation GQProfileTool

+ (void)profileModifyUserInfo:(NSDictionary *)parameters modifyType:(NSString *)type success:(void (^)(id))success failure:(void (^)(NSError *))failure
{
    
    NSString *url = nil;
    if ([type isEqualToString:@"0"]) {
        url = [NSString stringWithFormat:@"%@/chhead", kServerDomain];
    }else if([type isEqualToString:@"1"]){
        url = [NSString stringWithFormat:@"%@/chtag", kServerDomain];
    }else if([type isEqualToString:@"2"]){
        url = [NSString stringWithFormat:@"%@/chinfo", kServerDomain];
    }
    
    NSLog(@"%@", url);
    
    [GQHttpTool POST:url parameters:parameters success:^(id responseObject) {
        if (success) {
            success(responseObject);
        }
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
    }];
}

/*
         NSString *url = [NSString stringWithFormat:@"%@/login", kServerDomain];
         [GQHttpTool POST:url parameters:parameters.keyValues success:^(id responseObject) {
         GQLoginResult *result = [GQLoginResult objectWithKeyValues:responseObject];
         if (success) {
         success(result);
         }
         } failure:^(NSError *error) {
         if (failure) {
         failure(error);
         }
         }];
 */

@end
